QT += gui core
QT += multimedia

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets svg
greaterThan(QT_MAJOR_VERSION, 5): QT += statemachine

TARGET = view

TEMPLATE = lib

DEFINES += VIEW_LIBRARY

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    ClockChart.cpp \
    ClockWidget.cpp \
    DateLCD.cpp \
    DesktopTimer.cpp \
    DigitalClock.cpp \
    FileLineEdit.cpp \
    FocusWidget.cpp \
    FramelessWindow.cpp \
    Heart.cpp \
    InformationView.cpp \
    NewLineEdit.cpp \
    PlanWidget.cpp \
    ReminderWidget.cpp \
    ScreenshotSettingsWidget.cpp \
    RoundTimeBar.cpp \
    ScrollingLabel.cpp \
    ScreenshotWidget.cpp \
    SettingWidget.cpp \
    SystemWidget.cpp \
    TaskCompleteDialog.cpp \
    TaskEditDialog.cpp \
    TaskItemWidget.cpp \
    TaskPanelController.cpp \
    TimedWidget.cpp \
    TimePickerDialog.cpp \
    TimelineChart.cpp \
    WeekdayDisplay.cpp \
    messagebox.cpp \
    view.cpp

HEADERS += \
    ClockChart.h \
    ClockWidget.h \
    DateLCD.h \
    DesktopTimer.h \
    DigitalClock.h \
    FileLineEdit.h \
    FocusWidget.h \
    FramelessWindow.h \
    FramelessWindow.hpp \
    Heart.h \
    InformationView.h \
    NewLineEdit.h \
    PlanWidget.h \
    ReminderWidget.h \
    ScreenshotSettingsWidget.h \
    RoundTimeBar.h \
    ScrollingLabel.h \
    ScreenshotWidget.h \
    SettingWidget.h \
    StyleLoader.h \
    SystemWidget.h \
    TaskCompleteDialog.h \
    TaskEditDialog.h \
    TaskItemWidget.h \
    TaskPanelController.h \
    TimedWidget.h \
    TimePickerDialog.h \
    TimelineChart.h \
    WeekdayDisplay.h \
    messagebox.h \
    view_global.h \
    view.h

# Default rules for deployment.
unix {
    target.path = /usr/lib
}
!isEmpty(target.path): INSTALLS += target


win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../components/release/ -lcomponents
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../components/debug/ -lcomponents

INCLUDEPATH += $$PWD/../components
DEPENDPATH += $$PWD/../components

win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../components/release/libcomponents.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../components/debug/libcomponents.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../components/release/components.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../components/debug/components.lib


RESOURCES += \
    resource.qrc



QMAKE_CXXFLAGS += -Wno-strict-aliasing -Wno-unused-parameter -Wno-unused-variable -Wno-sign-compare

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../module/release/ -lmodule
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../module/debug/ -lmodule
else:unix: LIBS += -L$$OUT_PWD/../module/ -lmodule

INCLUDEPATH += $$PWD/../module
DEPENDPATH += $$PWD/../module

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../log/release/ -llog
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../log/debug/ -llog
else:unix: LIBS += -L$$OUT_PWD/../log/ -llog

INCLUDEPATH += $$PWD/../log
DEPENDPATH += $$PWD/../log

# 添加service依赖
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../service/release/ -lservice
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../service/debug/ -lservice
else:unix: LIBS += -L$$OUT_PWD/../service/ -lservice

INCLUDEPATH += $$PWD/../service
DEPENDPATH += $$PWD/../service

DISTFILES += \
    resource/svg/down.svg \
    resource/svg/left_black.svg \
    resource/svg/left_white.svg \
    resource/svg/up.svg

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../core/release/ -lcore
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../core/debug/ -lcore
else:unix: LIBS += -L$$OUT_PWD/../core/ -lcore

INCLUDEPATH += $$PWD/../core
DEPENDPATH += $$PWD/../core
